<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\agent\controller;

class AdminMassage
{
    public function listModule()
    {
    }
    public function getMassageList()
    {
    }
    public function getModule()
    {
        $param = $this->_param;
        $filter = [];
        if(isset($param["module_id"])) {
            $filter["module_id"] = $param["module_id"];
        }
        if(isset($param["is_base"])) {
            $filter["is_base"] = $param["is_base"];
        }
        if(empty($filter)) {
            return $this->error("module id is not exist ,please check param.");
        }
        $module_model = new \app\admin\model\Module();
        $module = $module_model->getModule($filter, $this->_uniacid);
        if(!empty($module)) {
            $module["status"] = 0;
            if(!empty($module["is_public"]) || !empty($module["is_base"])) {
                $module["status"] = 1;
            }
            if(empty($module["is_public"])) {
                if(empty($module["is_base"])) {
                    if(isset($module["module_app"]["status"])) {
                        $module["status"] = $module["module_app"]["status"];
                    } else {
                        $module["status"] = 0;
                    }
                }
                unset($module["module_app"]);
            }
        }
        return $this->success($module);
    }
}

?>